<?php
    echo"
        <b> Browser requirements:</b><br>
        <br>

        <script type=\"text/javascript\">
        <!--//
        document.write('<div class=java>Javascript: enabled</div>');
          var js = true;
        //-->
        </script>
        <NOSCRIPT>
                <div style=\"width: 400px; padding: 4px; border-style: solid; border-width:4px; border-color: red; text-align:justify;\">Please activate JavaScript
                </div>
        </NOSCRIPT>
        <br>
        <script  type=\"text/javascript\">
        <!--//
        //// Test Java ////
        if (navigator.javaEnabled() == true){
           var java = true;
          document.write(\"<div class=javabox>\");
        } else if (navigator.javaEnabled() == false) {
          document.write(\"<div class=javabad>Java disabled - Please activate!</div>\")
        } else {
          document.write(\"<div class=javabad>Java not detected - Please activate!<br>You may not define spots and you will not be able to view MS/MS spectra without Java.</div>\");
        }
        //-->
        </script>
        <NOSCRIPT>
        <div style=\"width: 400px; padding: 4px; border-style: solid; border-width:4px; border-color: red; text-align:justify;\">Please activate Java
                </div></NOSCRIPT>
        <applet height=\"30\" alt=\"\" width=\"300\" code=\"JavaVersionDisplayApplet.class\"></applet>
        <br>
        <script  type=\"text/javascript\">
        <!--//
        //// Test Cookies ////
        if (navigator.cookieEnabled == true) {
          var cookie = true;
          document.write(\"<div class=java>Cookies: enabled</div>\");
        } else if (navigator.cookieEnabled == false) {
          document.write(\"<div class=javabad>Cookies: disabled - Please activate!</div>\")
        } else {
          document.write(\"<div class=red>Cookies not detected - Please activate!</div>\");
        }
        //--end-->
        </script>
        <NOSCRIPT>
        <div style=\"width: 400px; padding: 4px; border-style: solid; border-width:4px; border-color: red; text-align:justify;\">Please activate Cookies
                </div></NOSCRIPT>
        <br>
        <form action=\"InstallStep2.php\" method=\"post\">
        <script type=\"text/javascript\">
    ";
    if($php == "true" AND $mysql == "true" AND $upload == "true"){
        echo "var server = true;";
    }
    if(server == true){
        document.write("Server requirements passed<br><br>");
        if(cookie == true && js == true && java == true) {
            document.write('Browser requirements passed<br><br>');
            document.write('<input type="submit" name="subject" value="Start installation">');
        } else {
            document.write('<input type="button" name="subject" value="Start installation" disabled>');
        }
    } else {
        document.write('<input type="button" name="subject" value="Start installation" disabled>');
    }
    echo"
        </script>
        </form>
        <br>
        <NOSCRIPT>
        <input type=button value=\"Install database\" name=\"install\" disabled/>
        </NOSCRIPT>
    ";
?>